package com.ly.user.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import tk.mybatis.mapper.annotation.KeySql;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * @author LT
 * @version 1.0.0
 * @ClassName User.java
 * @Description TODO 实体类
 * @createTime 2020年04月27日 10:25:00
 */
@Data
@Table(name = "tb_user")
public class User implements Serializable {
    @Id
    @KeySql(useGeneratedKeys = true)
    private Long id;
    @Column(name = "user_name")
    private String username;
    private String password;
    private String name;
    private Integer age;
    private Integer sex;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date birthday;
    private Date created;
    private Date updated;
}
